package com.telit.firecommand.service.impl;

import com.telit.common.entity.SysOperationLog;
import com.telit.common.service.LogService;
import com.telit.firecommand.dao.SysOperationLogDAO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 系统日志实现类
 *
 * @author yuezhuang
 * chencf  update on 2022-10-20
 * @date 2022-09-19
 */
@Slf4j
@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private SysOperationLogDAO sysOperationLogDAO;


    /**
     * 保存日志
     *
     * @param sysOperationLog 日志信息
     *
     * @return 是否保存成功
     */
    @Override
    public boolean saveLog(SysOperationLog sysOperationLog) {
        sysOperationLogDAO.insert(sysOperationLog);
        return true;
    }

}
